package com.yunhui.service;

import com.yunhui.entity.Merchant;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  商家的业务处理接口
 * </p>
 *
 * @author WGH
 * @since 2019-12-09
 */
public interface MerchantService extends IService<Merchant> {

    /**
     * 注册
     * @param account
     * @param phone
     * @param eamil
     * @param password
     * @return
     */
    public int insertMerchant(String account, String merchantname, String phone, String eamil,
                              String imgUrl, Date createDate, Integer status, String password);

    /**
     * 登录
     * @param account
     * @param password
     * @return
     */
    public Merchant businessLogin(String account, String phone, String eamil, String password);


    /**
     * 商家列表
     * @param
     * @return
     */
    public List<Merchant> businessList();


    /**
     * 根据ID查询详情
     * @param id
     * @return
     */
    public Merchant businessAndId(Integer id);


    /**
     * 总数
     * @return
     */
    public Integer findCount();

    /**
     *
     * 分页查询、企业名查询接口
     * @param Size
     * @param pageIndex
     * @param merchantname
     * @return
     */
    public List<Merchant> findPage(int Size, int pageIndex, String merchantname);


    /**
     * 状态 — 审批
     * @param status
     * @return
     */
    public Integer businessAndStatus(Integer status, Integer id);





}
